/**
 * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
define(["ojs/ojcore","jquery","ojs/ojcomponentcore","ojs/ojtime-base","ojs/internal-deps/dvt/DvtGantt"],function(a,g,b,c,d){a.Ra("oj.ojGantt",g.oj.dvtTimeComponent,{widgetEventPrefix:"oj",options:{viewportChange:null},Dg:function(a,b,c){a.styleClasses={databody:"oj-gantt-container",dependencyLine:"oj-gantt-dependency-line",dependencyLineConnector:"oj-gantt-dependency-line-connector",nodata:"oj-gantt-no-data-message",hgridline:"oj-gantt-horizontal-gridline",vgridline:"oj-gantt-vertical-gridline",majorAxis:"oj-gantt-major-axis",
majorAxisTicks:"oj-gantt-major-axis-separator",majorAxisLabels:"oj-gantt-major-axis-label",minorAxis:"oj-gantt-minor-axis",minorAxisTicks:"oj-gantt-minor-axis-separator",minorAxisLabels:"oj-gantt-minor-axis-label",row:"oj-gantt-row",rowLabel:"oj-gantt-row-label",task:"oj-gantt-task",taskLabel:"oj-gantt-task-label",tooltipLabel:"oj-gantt-tooltip-label",tooltipValue:"oj-gantt-tooltip-value",tooltipTable:"oj-gantt-tooltip-content",referenceObject:"oj-gantt-reference-object",selected:"oj-selected",hover:"oj-hover",
focus:"oj-focus"};return d.Gantt.newInstance(a,b,c)},Jf:function(){var a=this._super();a.push("oj-gantt");return a},SMa:function(){return{databody:"oj-gantt-container",dependencyLine:"oj-gantt-dependency-line",dependencyLineConnector:"oj-gantt-dependency-line-connector",nodata:"oj-gantt-no-data-message",hgridline:"oj-gantt-horizontal-gridline",vgridline:"oj-gantt-vertical-gridline",majorAxis:"oj-gantt-major-axis",majorAxisTicks:"oj-gantt-major-axis-separator",majorAxisLabels:"oj-gantt-major-axis-label",
minorAxis:"oj-gantt-minor-axis",minorAxisTicks:"oj-gantt-minor-axis-separator",minorAxisLabels:"oj-gantt-minor-axis-label",row:"oj-gantt-row",rowLabel:"oj-gantt-row-label",task:"oj-gantt-task",taskLabel:"oj-gantt-task-label",tooltipLabel:"oj-gantt-tooltip-label",tooltipValue:"oj-gantt-tooltip-value",tooltipTable:"oj-gantt-tooltip-content",referenceObject:"oj-gantt-reference-object",selected:"oj-selected",hover:"oj-hover",focus:"oj-focus"}},Hk:function(a){var b=a.subId;"oj-gantt-taskbar"==b?b="taskbar["+
a.rowIndex+"]["+a.index+"]":"oj-gantt-row-label"==b?b="rowLabel["+a.index+"]":"oj-gantt-tooltip"==b&&(b="tooltip");return b},Oh:function(a){var b={};0==a.indexOf("taskbar")?(a=this.Qm(a),b.subId="oj-gantt-taskbar",b.rowIndex=a[0],b.index=a[1]):0==a.indexOf("rowLabel")?(a=this.Qm(a),b.subId="oj-gantt-row-label",b.index=a[0]):"tooltip"==a&&(b.subId="oj-gantt-tooltip");return b},Ej:function(){var a=this._super();a["oj-gantt"]={path:"_resources/animationDuration",property:"animation-duration"};a["oj-gantt-zoomin-icon"]=
[{path:"_resources/zoomIn",property:"CSS_URL"},{path:"_resources/zoomIn_bgc",property:"background-color"},{path:"_resources/zoomIn_bc",property:"border-color"}];a["oj-gantt-zoomin-icon oj-hover"]=[{path:"_resources/zoomIn_h",property:"CSS_URL"},{path:"_resources/zoomIn_h_bgc",property:"background-color"},{path:"_resources/zoomIn_h_bc",property:"border-color"}];a["oj-gantt-zoomin-icon oj-active"]=[{path:"_resources/zoomIn_a",property:"CSS_URL"},{path:"_resources/zoomIn_a_bgc",property:"background-color"},
{path:"_resources/zoomIn_a_bc",property:"border-color"}];a["oj-gantt-zoomin-icon oj-disabled"]=[{path:"_resources/zoomIn_d",property:"CSS_URL"},{path:"_resources/zoomIn_d_bgc",property:"background-color"},{path:"_resources/zoomIn_d_bc",property:"border-color"}];a["oj-gantt-zoomout-icon"]=[{path:"_resources/zoomOut",property:"CSS_URL"},{path:"_resources/zoomOut_bgc",property:"background-color"},{path:"_resources/zoomOut_bc",property:"border-color"}];a["oj-gantt-zoomout-icon oj-hover"]=[{path:"_resources/zoomOut_h",
property:"CSS_URL"},{path:"_resources/zoomOut_h_bgc",property:"background-color"},{path:"_resources/zoomOut_h_bc",property:"border-color"}];a["oj-gantt-zoomout-icon oj-active"]=[{path:"_resources/zoomOut_a",property:"CSS_URL"},{path:"_resources/zoomOut_a_bgc",property:"background-color"},{path:"_resources/zoomOut_a_bc",property:"border-color"}];a["oj-gantt-zoomout-icon oj-disabled"]=[{path:"_resources/zoomOut_d",property:"CSS_URL"},{path:"_resources/zoomOut_d_bgc",property:"background-color"},{path:"_resources/zoomOut_d_bc",
property:"border-color"}];a["oj-gantt-major-axis-label"]={path:"_resources/majorAxisLabelFontProp",property:"CSS_TEXT_PROPERTIES"};a["oj-gantt-minor-axis-label"]={path:"_resources/minorAxisLabelFontProp",property:"CSS_TEXT_PROPERTIES"};a["oj-gantt-container"]={path:"_resources/chartArea/strokeWidth",property:"stroke-width"};a["oj-gantt-horizontal-gridline"]={path:"_resources/horizontalGridlineWidth",property:"stroke-width"};a["oj-gantt-task-label"]={path:"_resources/taskLabelFontProp",property:"CSS_TEXT_PROPERTIES"};
a["oj-gantt-row-label"]={path:"_resources/rowLabelFontProp",property:"CSS_TEXT_PROPERTIES"};return a},Fj:function(){return["optionChange","viewportChange"]},Ti:function(){var a=this.options.translations,b=this._super();b["DvtUtilBundle.GANTT"]=a.componentName;b["DvtUtilBundle.ZOOM_IN"]=a.tooltipZoomIn;b["DvtUtilBundle.ZOOM_OUT"]=a.tooltipZoomOut;return b},Tm:function(){this._super();var b=this.options._resources,c=a.za.dj(a.Hi.CONVERTER_TYPE_DATETIME);b.converterFactory=c;b.firstDayOfWeek=a.$a.uF()},
El:function(a){if("viewportChange"===a.type){var b=(new Date(a.viewportStart)).toISOString(),c=(new Date(a.viewportEnd)).toISOString(),d=a.majorAxisScale;a=a.minorAxisScale;var g={viewportStart:b,viewportEnd:c,majorAxisScale:d,minorAxisScale:a};this.fe("viewportStart",b);this.fe("viewportEnd",c);this.fe("majorAxis.scale",d);this.fe("minorAxis.scale",a);this._trigger("viewportChange",null,g)}else this._super(a)},Ik:function(){return{root:["rows"]}},getContextByNode:function(a){return(a=this.getSubIdByNode(a))&&
"oj-gantt-tooltip"!==a.subId?a:null}});a.Components.Xa("ojGantt","dvtTimeComponent",{properties:{animationOnDataChange:{type:"string"},animationOnDisplay:{type:"string"},axisPosition:{type:"string"},dependencies:{type:"Array\x3cobject\x3e"},end:{type:"number"},gridlines:{type:"object"},majorAxis:{type:"object"},minorAxis:{type:"object"},referenceObjects:{type:"Array\x3cobject\x3e"},rowAxis:{type:"object"},rows:{type:"Array\x3cobject\x3e"},selection:{type:"Array\x3cstring\x3e"},selectionMode:{type:"string"},
start:{type:"number"},taskDefaults:{type:"object"},tooltip:{type:"object"},valueFormats:{type:"Array\x3cobject\x3e"},viewportEnd:{type:"number"},viewportStart:{type:"number"}},methods:{whenReady:{}},extension:{_widgetName:"ojGantt"}});a.Components.register("oj-gantt",a.Components.getMetadata("ojGantt"))});